var t = getApp();

Page({
    data: {
        emptyText: "正在加载...",
        firstCount: "0人",
        totalCount: "0人",
        inviteJiaoCheng: "",
        inviteRule: "",
        users: []
    },
    loadData: function(a) {
        var n = this;
        t.network.post({
            url: t.url.GetWeddingOrderInviteInfo,
            params: {},
            before: function() {
                wx.showNavigationBarLoading();
            },
            success: function(a) {
                1 == a.data.result ? n.setData({
                    users: a.data.data.invites,
                    totalCount: a.data.data.totalCount,
                    firstCount: a.data.data.firstCount,
                    inviteJiaoCheng: a.data.data.inviteJiaoCheng,
                    inviteRule: a.data.data.inviteRule,
                    emptyText: "暂无邀请抢单成功记录"
                }) : t.util.showToast(a.data.message);
            },
            fail: function() {
                t.util.showToast("获取数据失败");
            },
            complete: function() {
                wx.hideNavigationBarLoading();
            }
        });
    },
    clickView: function() {
        wx.navigateTo({
            url: "../web/web?url=" + this.data.inviteJiaoCheng
        });
    },
    onLoad: function(t) {
        this.loadData();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});